import request from "@/utils/request";
// 查询催收预警列表
export function gerCollectionWarningList(query) {
  return request({
    url: "/collectionWarning/collectionWarning/list",
    method: "get",
    params: query,
  });
}

// 查询催收预警列表
export function getInitiateACollectionDetail(ids) {
  return request({
    url: `/collectionWarning/collectionWarning/initiateACollection/${ids}`,
    method: "get",
  });
}

// 选择处理人列表
export function getUseList(query) {
  return request({
    url: `/system/user/list`,
    method: "get",
    params: query,
  });
}


// 发起催收-提交
export function saveCollectionWarning(data) {
  return request({
    url: `/collectionWarning/collectionWarning`,
    method: "post",
    data: data
  });
}

// 获取催收预警配置详细信息
export function collectionConfig(types) {
  return request({
    url: `/collectionConfig/collectionConfig/${types}`,
    method: "get",
  });
}

// 维护催收预警配置
export function saveCollectionConfig(data) {
  return request({
    url: `/collectionConfig/collectionConfig`,
    method: "post",
    data: data
  });
}


// 查询催收管理列表
export function getCollectionManageList(query) {
  return request({
    url: `/collectionManage/collectionManage/list`,
    method: "get",
    params: query,
  });
}

// 获取催收管理详细信息
export function getCollectionManageDetail(id) {
  return request({
    url: `/collectionManage/collectionManage/${id}`,
    method: "get",
  });
}


// 查看催收详情催收预警
export function getCollectionWarningDetail(id) {
  return request({
    url: `/collectionWarning/collectionWarning/${id}`,
    method: "get",
  });
}

// 策略调整
export function sendStrategyAdjustment(data) {
  return request({
    url: `/collectionManage/collectionManage/strategyAdjustment`,
    method: "post",
    data: data
  });
}
// 暂缓/激活
export function sendSuspendActivate(data) {
  return request({
    url: `/collectionManage/collectionManage/suspendActivate`,
    method: "post",
    data: data
  });
}

// 手动结清
export function sendManualSettlement(data) {
  return request({
    url: `/collectionManage/collectionManage/manualSettlement`,
    method: "post",
    data: data
  });
}

// 改派
export function sendDispatchRecord(data) {
  return request({
    url: `/collectionManage/collectionManage/dispatchRecord`,
    method: "post",
    data: data
  });
}

// 查询催收处理列表
export function getCollectionHandleList(query) {
  return request({
    url: `/collectionConfig/collectionHandle/list`,
    method: "get",
    params: query,
  });
}

// 获取催收处理详细信息
export function getCollectionHandleDetail(id) {
  return request({
    url: `/collectionConfig/collectionHandle/${id}`,
    method: "get",
  });
}

// 提交催收结果
export function saveCollectionHandle(data) {
  return request({
    url: `/collectionConfig/collectionHandle`,
    method: "post",
    data: data
  });
}

// 申请销账-回显数据
export function getWriteOffApplication(manageId) {
  return request({
    url: `/collectionConfig/collectionWriteOffApplication/getInfo/${manageId}`,
    method: "get",
  });
}

//申请销账-提交
export function saveWriteOffApplication(data) {
  return request({
    url: `/collectionConfig/collectionWriteOffApplication`,
    method: "post",
    data: data
  });
}

//催收 详情页面-销账申请详情
export function collectionWriteOffApplicationDetail(id) {
  return request({
    url: `/collectionConfig/collectionWriteOffApplication/${id}`,
    method: "get",
  });
}

//查询催收管理统计
export function statisticsDetail(query) {
  return request({
    url: `/collectionManage/collectionManage/statistics`,
    method: "get",
    params: query
  });
}
//查询催收处理统计
export function collectionHandleDetail(query) {
  return request({
    url: `/collectionConfig/collectionHandle/statistics`,
    method: "get",
    params: query
  });
}

//处于委外收车或者司法诉讼阶段列表
export function atSoFoJpList(query) {
  return request({
    url: `/collectionManage/collectionManage/atsofojpList`,
    method: "get",
    params: query
  });
}

//查询回款记录
export function collectionWarningReturn(query) {
  return request({
    url: `/collectionWarning/collectionWarning/return`,
    method: "get",
    params: query
  });
}